package com.hsmpay.mobile.dao.trans.impl;

import java.util.List;
import org.springframework.stereotype.Repository;

import com.hsmpay.common.dao.Impl.BaseDaoSupport;
import com.hsmpay.mobile.dao.trans.UserNocardpayLogDao;
import com.hsmpay.mobile.pojo.trans.UserNocardpayLog;
import com.hsmpay.mobile.pojo.trans.UserNocardpayLogExample;

@SuppressWarnings("deprecation")
@Repository("userNocardpayLogDao")
public class UserNocardpayLogDaoImpl extends  BaseDaoSupport<UserNocardpayLog, Long>  implements UserNocardpayLogDao <UserNocardpayLog, Long>  {

    public UserNocardpayLogDaoImpl() {
        super();
    }

    public void insert(UserNocardpayLog record) {
        getSqlMapClientTemplate().insert("userNocardpayLogSqlMap.insert", record);
    }

    public int updateByPrimaryKey(UserNocardpayLog record) {
        int rows = getSqlMapClientTemplate().update("userNocardpayLogSqlMap.updateByPrimaryKey", record);
        return rows;
    }

    public int updateByPrimaryKeySelective(UserNocardpayLog record) {
        int rows = getSqlMapClientTemplate().update("userNocardpayLogSqlMap.updateByPrimaryKeySelective", record);
        return rows;
    }

    public List selectByExample(UserNocardpayLogExample example) {
        List list = getSqlMapClientTemplate().queryForList("userNocardpayLogSqlMap.selectByExample", example);
        return list;
    }

    public UserNocardpayLog selectByPrimaryKey(String orderid) {
        UserNocardpayLog key = new UserNocardpayLog();
        key.setOrderid(orderid);
        UserNocardpayLog record = (UserNocardpayLog) getSqlMapClientTemplate().queryForObject("userNocardpayLogSqlMap.selectByPrimaryKey", key);
        return record;
    }

    public int deleteByExample(UserNocardpayLogExample example) {
        int rows = getSqlMapClientTemplate().delete("userNocardpayLogSqlMap.deleteByExample", example);
        return rows;
    }

    public int deleteByPrimaryKey(String orderid) {
        UserNocardpayLog key = new UserNocardpayLog();
        key.setOrderid(orderid);
        int rows = getSqlMapClientTemplate().delete("userNocardpayLogSqlMap.deleteByPrimaryKey", key);
        return rows;
    }

    public int countByExample(UserNocardpayLogExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("userNocardpayLogSqlMap.countByExample", example);
        return count.intValue();
    }

    public int updateByExampleSelective(UserNocardpayLog record, UserNocardpayLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userNocardpayLogSqlMap.updateByExampleSelective", parms);
        return rows;
    }

    public int updateByExample(UserNocardpayLog record, UserNocardpayLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userNocardpayLogSqlMap.updateByExample", parms);
        return rows;
    }

    private static class UpdateByExampleParms extends UserNocardpayLogExample {
        private Object record;

        public UpdateByExampleParms(Object record, UserNocardpayLogExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}